package com.lihui.test;

import com.lihui.linkedlist.SingleLinkedList;

/**
 * 功能描述
 *
 * @author wileda
 * @date 2022/10/08  19:44
 */
public class Demo {
    public static void main(String[] args) {
        SingleLinkedList singleLinkedList = new SingleLinkedList();
        singleLinkedList.addLast(12);
        singleLinkedList.addLast(23);
        singleLinkedList.addLast(34);
        singleLinkedList.addLast(45);
        singleLinkedList.addLast(56);
        singleLinkedList.display();
        System.out.println(singleLinkedList.size());
        System.out.println("=========================");
        singleLinkedList.addIndex(2,100);
        singleLinkedList.addIndex(4,200);
        singleLinkedList.display();
        System.out.println("=========================");
        singleLinkedList.addFirst(01);
        singleLinkedList.addIndex(4,200);
        singleLinkedList.addIndex(6,200);
        singleLinkedList.display();
        System.out.println("=========================");
        singleLinkedList.remove(200);
        singleLinkedList.display();
        System.out.println("=========================");
        singleLinkedList.removeAllKey(200);
        singleLinkedList.display();
        System.out.println("=========================");
        System.out.println(singleLinkedList.size());
        System.out.println("=========================");
        singleLinkedList.clear();
        singleLinkedList.display();


    }
}
